<style>
#logsAdmin #logsResultDiv{
	margin-top:2px;
	clear:both;
}
#logsAdmin label{
	width:50px;
}
#logsAdmin label.auto{
	width:auto;
}
#logsResultDiv,
#filterLogsForm{
	width:800px;
}
#filterLogsForm input[type=submit]{
	float:right;
}
#logsResultDiv ul.letter_filter li.last a,
#logsResultDiv ul.letter_filter li.first a{
	display:block;
	float:left;
	width:16px;
	height:15px;
	margin-top:-2px;
	background-repeat:no-repeat;
	background-position:center center;
}
#logsResultDiv ul.letter_filter li.first a{
	background-image:url(gui/record_first.gif);
}
#logsResultDiv ul.letter_filter li.first a:hover{
	background-image:url(gui/record_first_h.gif);
}
#logsResultDiv ul.letter_filter li.last a{
	background-image:url(gui/record_last.gif);
}
#logsResultDiv ul.letter_filter li.last a:hover{
	background-image:url(gui/record_last_h.gif);
}
</style>
<div id="logsAdmin">
	<h1>Registar akcija u bazi</h1>
	<form id="filterLogsForm" class="area" method="post" action="javascript:void(0)" onsubmit="submitForm(this,'logs.php','POST','setContent',1)">
		<input type="hidden" name="page" value="1" />
	
		<input type="submit" onclick="this.parentNode.elements['page'].value=1;" value="filter" />
		<label class="left" for="filter_user">Korisnik:</label>
		<select name="filter_user" id="filter_user">
			<option value="-1">---</option>
			{{%loop start user_id}}
			<option value="{{$user_id}}" {{$user_selected}}>{{$user_ime}}&nbsp;{{$user_prezime}}&nbsp;<span class="username">[&nbsp;{{$user}}&nbsp;]</span></option>
			{{%loop end}}
		</select>
		
		<label class="left" for="filter_od">OD:</label>
		<input type="text" class="dateInput" name="filter_od" id="filter_od" value="{{$filter_od}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker('filter_od',this)" />
		
		<label class="left" for="filter_do">DO:</label>
		<input type="text" class="dateInput" name="filter_do" id="filter_do" value="{{$filter_do}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker('filter_do',this)" />
		
		<label class="left" for="filter_state">Status:</label>
		<select name="filter_state" id="filter_state">
			<option value="-1">---</option>
			{{%loop start state_id}}
			<option value="{{$state_id}}" {{$state_selected}}>{{$state_name}}</option>
			{{%loop end}}
		</select>
		
		<br clear="all" />
		
		<label class="left" for="filter_table">Tabela:</label>
		<select name="filter_table" id="filter_table">
			<option value="-1">---</option>
			{{%loop start table_name}}
			<option value="{{$table_name}}" {{$table_selected}}>{{$table_name}}</option>
			{{%loop end}}
		</select>
		
		<label class="left" for="filter_value">Vrednost:</label>
		<input type="text" name="filter_value" id="filter_value" value="{{$filter_value}}" />
	</form>
	<div class="area" id="logsResultDiv">
		{{$comment_start}}
		<ul class="letter_filter">
			<li>Strana [{{$numpages}}]:</li>
			<li class="first"><a href="javascript:void(0)" onclick="var forma=document.getElementById('filterLogsForm'); forma.elements['page'].value=1; submitForm(forma,'logs.php','POST','setContent',1)"></a></li>
			{{%loop start page}}
			<li><a id="{{$current_page}}" href="javascript:void(0)" onclick="var forma=document.getElementById('filterLogsForm'); forma.elements['page'].value=this.innerHTML; submitForm(forma,'logs.php','POST','setContent',1)">{{$page}}</a></li>
			{{%loop end}}
			<li class="last"><a href="javascript:void(0)" onclick="var forma=document.getElementById('filterLogsForm'); forma.elements['page'].value={{$numpages}}; submitForm(forma,'logs.php','POST','setContent',1)"></a></li>
		</ul><br clear="all" />
		<table width="100%">
			<tr class="head" align="center">
				<td>vreme</td>
				<td>user</td>
				<td>radnik</td>
				<td>IP adresa</td>
				<td>tabela</td>
				<td>vrednost</td>
				<td>akcija</td>
			</tr>
			{{%loop start action}}
			<tr align="center">
				<td>{{$time}}</td>
				<td>{{$username}}</td>
				<td>{{$radnik_ime}}&nbsp;{{$radnik_prezime}}</td>
				<td><a href="javascript:void(0);" onclick="LoadRSDoc('logs.php?a=netbios&ip={{$ip}}','ypAjaxForm')">{{$ip}}</a></td>
				<td>{{$table}}</td>
				<td>{{$value}}</td>
				<td>{{$akcija}}</td>
			</tr>
			{{%loop end}}
		</table>
		{{$comment_end}}
	</div>
	<div class="info" style="margin:-20px 0px 0px -80px; position:relative; float:left;">{{$info}}</div>
</div>